package edu.cth.scrabbit.client.core.network;

import edu.cth.scrabbit.client.core.ClientModel;
import edu.cth.scrabbit.shared.GameState;
import edu.cth.scrabbit.shared.network.Statement;
import edu.cth.scrabbit.shared.network.Statement.Statement_Type;

/**
 * 
 * @author Anders Jonsson, Marcus Harryson
 * 
 */
public class ClientProtocol {

	public static void processStatement(Statement incomingStatement) {
		// TODO this method.
		Statement_Type type = incomingStatement.getType();
		switch (type) {
		case SERVER_GAME_UPDATE:
			GameState gs = (GameState) incomingStatement.getContent();
			ClientModel.getInstance().processGameUpdate(gs);
			break;
		}
	}
}
